// script.js  
document.addEventListener('DOMContentLoaded', function() {  
    const button = document.getElementById('moneyButton');  
    let isMoving = false;  
  
    function moveButton() {  
        if (!isMoving) {  
            isMoving = true;  
            setTimeout(() => {  
                const maxX = window.innerWidth - button.offsetWidth;  
                const maxY = window.innerHeight - button.offsetHeight;  
                const randomX = Math.floor(Math.random() * maxX);  
                const randomY = Math.floor(Math.random() * maxY);  
  
                button.style.position = 'absolute';  
                button.style.left = `${randomX}px`;  
                button.style.top = `${randomY}px`;  
  
                isMoving = false;  
            }, 100); // 稍微延迟一下，避免过于频繁地移动  
        }  
    }  
  
    document.addEventListener('mousemove', moveButton);  
});